# a = 99
# b = 0
# result = a / b
# print(result)

# year = int(input('请输入年：'))
# month  = int(input('请输入月：'))
# day = int(input('请输入日：'))
# # 闰年：被4整除且不能被100整除（普通闰年）；被400整除的（世纪闰年）
# # 平年2月28天，闰年2月29天
# feb = 0
# sum = 0
# if year//4 == 0 and year // 100 != 0 or year // 400 == 0:
#     feb = 29
# else:
#     feb = 28
# months = [0,31,feb,31,30,31,30,31,31,30,31,30,31]
# for i in range(month):
#     sum += months[i]
# sum = sum + day
# print("您输入的日期是当年的第%s天" % sum)

# def solution(r: int, g: int, b: int)-> str:
#     # your code here
#     arg = r,g,b
#     RGB = []
#     for item in arg:
#         new = str(hex(item)).split("x")[-1].upper()
#         if len(new) == 1:
#             RGB.append("0"+new)
#             continue
#         RGB.append(new)
#     return "".join(RGB)
#
#
# assert solution(1, 2, 3) == "010203"
# assert solution(255, 255, 255) == "FFFFFF"
# assert solution(148, 0, 211) == "9400D3"
#
# print(solution(255, 255, 255))
#
# solution(1, 2, 3)

def solution(r: int, g: int, b: int)-> str:
    # your code here
    arg = r,g,b
    RGB = []
    for item in arg:
        new = str(hex(item)).split("x")[-1].upper()
        if len(new) == 1:
            RGB.append("0"+new)
            continue
        RGB.append(new)
    return "".join(RGB)


assert solution(1, 2, 3) == "010203"
assert solution(255, 255, 255) == "FFFFFF"
assert solution(148, 0, 211) == "9400D3"

s= solution(1, 2, 3)
print(s)



